-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update default settings #338
Conversation
290d595
to
ce8c2f4
Compare
@Y-- can you look into these test failures related to |
One other probably good change is to never set So that's not really a real solution, just a related thing that we probably want to do anyway. |
test/regression/regression.conf
Outdated
@@ -3,3 +3,4 @@ | |||
shared_preload_libraries = 'pg_duckdb' | |||
duckdb.force_execution = true | |||
log_temp_files = -1 | |||
duckdb.disabled_filesystems = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be necessary. If we need to do this in tests it means this is a bad default (at the moment). Having a default that breaks half of pg_duckdb half of the functionality completely, even for the superuser
I think there's two things we need to do:
- temporarily change
duckdb_disabled_filesystems
to''
when we know we want to interact with the filesystem. Like installing duckdb extensions, or when caching a parquet file. - Make sure that for postgres superusers this setting is always set to
''
. They can already access files on the filesystem in various ways, so there's no point in blocking them when executing queries in DuckDB. Also they could just change theduckdb.disabled_filesystems
setting.
Those two should probably build on top of #342
1b1a98a
to
0f44d39
Compare
e4f1922
to
f917ef4
Compare
values[Anum_duckdb_extension_enable - 1] = 1; | ||
|
||
/* create heap tuple and insert into catalog table */ | ||
Relation duckdb_extensions_relation = relation_open(ExtensionsTableRelationId(), RowExclusiveLock); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is ExtensionsTableRelationId
still used somewhere now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In ReadDuckdbExtensions
f05ed5f
to
a5ea466
Compare
|
||
/* inserting extension record */ | ||
HeapTuple new_tuple = heap_form_tuple(tuple_descr, values, nulls); | ||
CatalogTupleInsert(duckdb_extensions_relation, new_tuple); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This low level API was not causing the trigger to be fired. So this PR actually also fixes a bug where the duckdb.install_extension()
call would not update the sequence, and thus not existing cause connections to load the extension.
Okay, I made the necessary changes to make these new defaults usable. It now depends on #342 though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The base branch was changed.
Co-authored-by: Y. <[email protected]>
622b54c
to
666ed03
Compare
Fixes #217
This changes the defaults for
duckdb.max_memory
andduckdb.disabled_filesystems
to the agreed upon settings. While doing that I found two issues that this also fixes:duckdb.disabled_filesystems = 'LocalFilesystem'
was basically a way to make DuckDB execution unusable, due to us doing file system access when initializing the database/connection. So now we enable the setting later. Also we now don't callINSTALL {extension}
during connection initialization anymore.duckdb.install_extension()
was called. Only for direct inserts to theduckdb.extensions
table. That's fixed by not using the low-levelCatalogTupleInsert
, and instead switching to SPI.duckdb.disabled_filesystems
, they should be able to do whatever they want. So now this setting is not actually configured for superusers anymore.